home *** CD-ROM | disk | FTP | other *** search
/ SGI Freeware 2002 November / SGI Freeware 2002 November - Disc 1.iso / dist / fw_apache2.idb / usr / freeware / apache2 / manual / mod / perchild.xml.z / perchild.xml
Extensible Markup Language  |  2002-07-08  |  6KB  |  156 lines

  1. <?xml version="1.0"?>
  2. <!DOCTYPE modulesynopsis SYSTEM "../style/modulesynopsis.dtd">
  3. <?xml-stylesheet type="text/xsl" href="../style/manual.en.xsl"?>
  4. <modulesynopsis>
  5.  
  6. <name>perchild</name>
  7. <description>Multi-Processing Module allowing for daemon processes
  8.     serving requests to be assigned a variety of different
  9.     userids</description>
  10. <status>MPM</status>
  11. <sourcefile>perchild.c</sourcefile>
  12. <identifier>mpm_perchild_module</identifier>
  13.  
  14. <summary>
  15. <note type="warning">
  16. This MPM does not currently work on most platforms.  Work is ongoing to
  17. make it functional.
  18. </note>
  19.  
  20.     <p>This Multi-Processing Module (MPM) implements a hybrid
  21.     multi-process, multi-threaded web server. A fixed number of
  22.     processes create threads to handle requests. Fluctuations in
  23.     load are handled by increasing or decreasing the number of
  24.     threads in each process.</p>
  25.  
  26.     <p>A single control process launches the number of child processes
  27.     indicated by the <directive
  28.     module="mpm_common">NumServers</directive> directive at server
  29.     startup. Each child process creates threads as specified in the
  30.     <directive module="mpm_common">StartThreads</directive> directive.
  31.     The individual threads then
  32.     listen for connections and serve them when they arrive.</p>
  33.  
  34.     <p>Apache always tries to maintain a pool of <em>spare</em> or
  35.     idle server threads, which stand ready to serve incoming
  36.     requests. In this way, clients do not need to wait for new
  37.     threads to be created. For each child process, Apache assesses
  38.     the number of idle threads and creates or destroys threads to
  39.     keep this number within the boundaries specified by
  40.     <directive module="mpm_common">MinSpareThreads</directive>
  41.     and <directive module="mpm_common">MaxSpareThreads</directive>.
  42.     Since this process is very self-regulating, it is rarely
  43.     necessary to modify these directives from their default values.
  44.     The maximum number of clients that may be served simultaneously
  45.     is determined by multiplying the number of server processes
  46.     that will be created (<directive 
  47.     module="mpm_common">NumServers</directive>) by the maximum
  48.     number of threads created in each process
  49.     (<directive module="mpm_common">MaxThreadsPerChild</directive>).</p>
  50.  
  51.     <p>While the parent process is usually started as root under
  52.     Unix in order to bind to port 80, the child processes and
  53.     threads are launched by Apache as a less-privileged user. The
  54.     <directive module="mpm_common">User</directive> and <directive
  55.     module="mpm_common">Group</directive> directives are used to
  56.     set the privileges of the Apache child processes. The child
  57.     processes must be able to read all the content that will be
  58.     served, but should have as few privileges beyond that as
  59.     possible. In addition, unless <a
  60.     href="../suexec.html">suexec</a> is used, these directives also
  61.     set the privileges which will be inherited by CGI scripts.</p>
  62.  
  63.     <p><directive module="mpm_common">MaxRequestsPerChild</directive>
  64.     controls how frequently the
  65.     server recycles processes by killing old ones and launching new
  66.     ones.</p>
  67.  
  68.     <p>See also: <a href="../bind.html">Setting which addresses and
  69.     ports Apache uses</a>.</p>
  70.  
  71.     <p>In addition it adds the extra ability to specify that
  72.     specific processes should serve requests under different
  73.     userids. These processes can then be associated with specific
  74.     virtual hosts.</p>
  75.     <!-- XXX: This desperately needs more explanation. -->
  76. </summary>
  77.  
  78. <directivesynopsis location="mpm_common">
  79. <name>CoreDumpDirectory</name>
  80. </directivesynopsis>
  81. <directivesynopsis location="mpm_common">
  82. <name>Group</name>
  83. </directivesynopsis>
  84. <directivesynopsis location="mpm_common">
  85. <name>PidFile</name>
  86. </directivesynopsis>
  87. <directivesynopsis location="mpm_common">
  88. <name>Listen</name>
  89. </directivesynopsis>
  90. <directivesynopsis location="mpm_common">
  91. <name>ListenBacklog</name>
  92. </directivesynopsis>
  93. <directivesynopsis location="mpm_common">
  94. <name>LockFile</name>
  95. </directivesynopsis>
  96. <directivesynopsis location="mpm_common">
  97. <name>MaxRequestsPerChild</name>
  98. </directivesynopsis>
  99. <directivesynopsis location="mpm_common">
  100. <name>MaxSpareThreads</name>
  101. </directivesynopsis>
  102. <directivesynopsis location="mpm_common">
  103. <name>MaxThreadsPerChild</name>
  104. </directivesynopsis>
  105. <directivesynopsis location="mpm_common">
  106. <name>MinSpareThreads</name>
  107. </directivesynopsis>
  108. <directivesynopsis location="mpm_common">
  109. <name>NumServers</name>
  110. </directivesynopsis>
  111. <directivesynopsis location="mpm_common">
  112. <name>ScoreBoardFile</name>
  113. </directivesynopsis>
  114. <directivesynopsis location="mpm_common">
  115. <name>SendBufferSize</name>
  116. </directivesynopsis>
  117. <directivesynopsis location="mpm_common">
  118. <name>StartThreads</name>
  119. </directivesynopsis>
  120. <directivesynopsis location="mpm_common">
  121. <name>User</name>
  122. </directivesynopsis>
  123.  
  124. <directivesynopsis>
  125. <name>AssignUserId</name>
  126. <syntax>AssignUserID <em>user_id</em> <em>group_id</em></syntax>
  127. <contextlist><context>virtual host</context></contextlist>
  128.  
  129. <usage>
  130.     <p>Tie a virtual host to a specific child process. Requests addressed to
  131. the virtual host where this directive appears will be served by the process
  132. running with the specified user and group id.</p>
  133. </usage>
  134. </directivesynopsis>
  135.  
  136. <directivesynopsis>
  137. <name>ChildPerUserId</name>
  138. <syntax>ChildPerUserID <em>user_id</em>
  139. <em>group_id</em> <em>child_id</em></syntax>
  140. <contextlist><context>server config</context></contextlist>
  141.  
  142. <usage>
  143. <p>Specify a user id and group id for a specific child process. The number of
  144. children is set by the <directive module="mpm_common">NumServers</directive>
  145. directive. For example, the default value for <directive
  146. module="mpm_common">NumServers</directive> is 5 and that means
  147. children ids 1,2,3,4 and 5 are available for assigment. If a child does not
  148. have an associated ChildPerUserID, it inherits the <directive
  149. module="mpm_common">User</directive> and <directive
  150. module="mpm_common">Group</directive> settings from the main server </p> 
  151. </usage>
  152. </directivesynopsis>
  153.  
  154. </modulesynopsis>
  155.  
  156.